#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(racanhack, 1.0.1, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION, no-define)

# Checks for programs.
AC_PROG_CC

# Checks for libraries.
# Checks for GTK.
GTK_VERSION=2.0.0
AM_PATH_GTK_2_0($GTK_VERSION,
		:,
		AC_MSG_ERROR([*** GTK version $GTK_VERSION not found!])
)
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"

# Checks for GLIB.
GLIB_VERSION=2.0.0
AM_PATH_GLIB_2_0($GLIB_VERSION,
		 :,
		 AC_MSG_ERROR([*** GLIB version $GLIB_VERSION not found!])
)
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"

# Checks for SDL.
SDL_VERSION=1.1.0
AM_PATH_SDL($SDL_VERSION,
	    :,
	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([atexit])
AC_OUTPUT(Makefile src/Makefile)
